home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6331 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: in2.uu.net!tandem!francis
  2. From: francis@patch.tandem.com (Francis E. Chang)
  3. Newsgroups: comp.lang.c
  4. Subject: [Perf:] mem*() procs vs. array looping
  5. Date: 24 Feb 1996 00:06:25 GMT
  6. Organization: Tandem Computers Inc., Cupertino CA
  7. Message-ID: <4glkq1$gu7@gazette.tandem.com>
  8. NNTP-Posting-Host: sunlight.patch.tandem.com
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. Hi,
  12.  
  13. Are mem*() procedures performance boosters?  For example, for using
  14.  
  15.   memcpy(tgt, src, length);
  16.  
  17. instead
  18.  
  19.   for (index=0; index < length; index++)
  20.     tgt[i] = src[i];
  21.  
  22. how much saving would it have?  Would a smart compiler optimize
  23. the second solution?
  24.  
  25. TIA
  26.  
  27. Francis Chang
  28.  
  29. --
  30. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  31. = The opinions expressed here do not reflect those of my employer.  =
  32. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  33. =     Francis Chang               francis@patch.tandem.com          =
  34. =     Tandem Computers Inc.       (408)285-6863  Phone            =
  35. =     NonStop SQL Development     (408)285-2227  FAX                =
  36. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  37.